﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="CoinStatistics.aspx.vb" Inherits="Crazyforcoins.CoinStatistics" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">


<strong>Top 5 Most <em>Rated </em>Categories</strong>
<br/>

    <asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource2" 
        Width="600px">
        <series>
            <asp:Series Name="Series1" XValueMember="Title" YValueMembers="AverageRating">
            </asp:Series>
        </series>
        <chartareas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </chartareas>
    </asp:Chart>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:CoinsConn %>" 
        ProviderName="<%$ ConnectionStrings:CoinsConn.ProviderName %>" 
        SelectCommand="SELECT top 5 [AverageRating], [Category], [Title] FROM [CategoryAverage] ORDER BY [AverageRating] DESC">
    </asp:SqlDataSource>

    <strong>
    <br />
    Top 5 Most <span class="style6"><em>liked </em></span>Categories</strong>

    <br />
    <asp:Chart ID="Chart2" runat="server" DataSourceID="SqlDataSource1" 
        Width="600px">
        <series>
            <asp:Series Name="Series1" XValueMember="Title" YValueMembers="UserLikes" 
                ChartType="Doughnut" YValuesPerPoint="2">
            </asp:Series>
        </series>
        <chartareas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </chartareas>
    </asp:Chart>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:CoinsConn %>" 
        ProviderName="<%$ ConnectionStrings:CoinsConn.ProviderName %>" 
        SelectCommand="SELECT top 5 [Title], [UserLikes] FROM [CategorylikeCount] ORDER BY [UserLikes] DESC">
    </asp:SqlDataSource>
    <br />
    <br />
    <strong>Top 5 Most <em>Discussion Page </em>Views</strong>
    <br />
    <asp:Chart ID="Chart3" runat="server" Width="600px" 
        DataSourceID="SqlDataSource3">
        <Series>
            <asp:Series Name="Series1" XValueMember="Title" 
                YValueMembers="CountOfPageViews">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
        ConnectionString="<%$ ConnectionStrings:CoinsConn %>" 
        ProviderName="<%$ ConnectionStrings:CoinsConn.ProviderName %>" 
        SelectCommand="SELECT top 5 [Title], [CountOfPageViews] FROM [PageViewQuery] ORDER BY [CountOfPageViews] DESC">
        </asp:SqlDataSource>
        
    <br />
    <br />
    <br />
    <strong>Top 5 Most <em>Video Page </em>Views</strong>
    <br />
    <asp:Chart ID="Chart4" runat="server" DataSourceID="SqlDataSource5" 
        Width="600px">
        <Series>
            <asp:Series Name="Series1" XValueMember="VideoTitle" 
                YValueMembers="CountOfViews">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>
    <asp:SqlDataSource ID="SqlDataSource5" runat="server" 
        ConnectionString="<%$ ConnectionStrings:CoinsConn %>" 
        ProviderName="<%$ ConnectionStrings:CoinsConn.ProviderName %>" 
        SelectCommand="SELECT top 5 [VideoTitle], [CountOfViews] FROM [VideoViewQuery] ORDER BY [CountOfViews] DESC">
        </asp:SqlDataSource>
    <br />
    <br />
    <br />
    <br />
    <br />

    

</asp:Content>

